use std::string::String;
use sqlx::{Error};


pub async fn user_error_map(msg:Error)->String{
    println!("{:#?}",msg);
    match msg{
        Error::Database(er) => er.message().to_string(),
        Error::RowNotFound => "该用户不存在".to_string(),
        Error::ColumnDecode{index:_,source:_} => "出现错误，请重试或联系管理员".to_string(),
        _ => "no more".to_string(),
    }
}